package com.xiaoma.util;

import com.alibaba.fastjson.JSONObject;
import org.junit.Test;

/**
 * @author maj
 * @ClassName JsonUtil
 * @Description
 * @date 2020-12-03 14:50
 */
public class JsonUtil {

  @Test
  public void parseObject(){
    String str="{\"validationDetails\":{\"replyFrom\":\"STARPCD\",\"numberValid\":\"TRUE\",\"accountValid\":\"TRUE\",\"nameMatch\":\"TRUE\"},\"acceptFFP\":\"TRUE\",\"starTierLevel\":\"G\"}\n";
    ResponseNormal responseNormal = JSONObject.parseObject(str, ResponseNormal.class);
    System.out.println(responseNormal.getValidationDetails().getReplyFrom());
  }
}
